/*
 *  Copyright (C) 2010 Glauco
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.common.defaults;

import org.balisunrise.common.Basic;
import org.balisunrise.common.EntityList;
import org.balisunrise.common.events.ListChangedEvent;

/**
 *
 * @author glacuo
 */
public class DefaultListChangedEvent extends DefaultEvent
        implements ListChangedEvent{

    EntityList entityList;
    int initialIndex, finalIndex;

    public DefaultListChangedEvent(Basic owner,
            EntityList entityList, int initialIndex, int finalIndex) {
        super(DefaultEvent.LIST_CHANGED_EVENT, owner);
        this.entityList = entityList;
        this.initialIndex = initialIndex;
        this.finalIndex = finalIndex;
    }

    public void setEntityList(EntityList entityList) {
        this.entityList = entityList;
    }

    public void setFinalIndex(int finalIndex) {
        this.finalIndex = finalIndex;
    }

    public void setInitialIndex(int initialIndex) {
        this.initialIndex = initialIndex;
    }

    @Override
    public EntityList getEntityList() {
        return entityList;
    }

    @Override
    public int getInitialIndex() {
        return initialIndex;
    }

    @Override
    public int getFinalIndex() {
        return finalIndex;
    }

}
